home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / misc / LEDA_gene.lha / LEDA-3.1c-generic / incl / LEDA / leda_panel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-05  |  2.4 KB  |  90 lines

  1. /*******************************************************************************
  2. +
  3. +  LEDA  3.1c
  4. +
  5. +
  6. +  leda_panel.h
  7. +
  8. +
  9. +  Copyright (c) 1994  by  Max-Planck-Institut fuer Informatik
  10. +  Im Stadtwald, 6600 Saarbruecken, FRG     
  11. +  All rights reserved.
  12. *******************************************************************************/
  13.  
  14.  
  15. #include <LEDA/leda_window.h>
  16.  
  17.  
  18. #define MAX_BUT_NUM  64
  19. #define MAX_ITEM_NUM 32
  20.  
  21.  
  22. class LEDA_PANEL : public LEDA_WINDOW {
  23.  
  24. Window win;
  25.  
  26. char*  header;
  27.  
  28. int    XPOS;
  29. int    YPOS;
  30.  
  31. int    but_count;
  32. int    item_count;
  33. int    act_str_item;
  34.  
  35. char*  button_str[MAX_BUT_NUM];
  36. char*  label_str [MAX_ITEM_NUM];
  37.  
  38. int    kind   [MAX_ITEM_NUM];
  39. void*  ref    [MAX_ITEM_NUM];
  40. int    dat1   [MAX_ITEM_NUM];   // min (slider), size (choice), 
  41.                                 // number of menu items (string_menu_item)
  42. int    dat2   [MAX_ITEM_NUM];   // max (slider)  step (choice)
  43. int    offset [MAX_ITEM_NUM];   // choice item only
  44. char** choices[MAX_ITEM_NUM];   // choice item, string_menu_item)
  45.  
  46. int   but_layout;
  47.  
  48.  
  49. void activate_string_item(int xoff, int yoff, int yskip, int ytskip, 
  50.                                                          int t_length, int n);
  51. int  panel_text_edit(int xt, int yt, int t_len, char *str);
  52. void put_text_item(int x, int y, const char* s, int t_len);
  53. void draw_choice_item(int i,int x0, int y0, int width,int yskip);
  54. void draw_bool_item(int i,int x0, int y0, int width,int yskip);
  55. void draw_slider_item(int i, int x01, int x0, int y0,int length, int yskip, float x);
  56. void draw_button(const char* s, int x, int y, int bw,int yskip, int pressed);
  57.  
  58.  
  59. public:
  60.  
  61. void text_item(const char* s);
  62. void string_item(const char* s, char** x);
  63. void string_menu_item(const char* s, char** x, const char* menu_label,int argc,const char** argv);
  64. void int_item(const char* s, int* x);
  65. void slider_item(const char* s, int* x, int min, int max);
  66. void float_item(const char* s, double* x);
  67. void choice_item(const char* text, int* address, int argc, const char** argv, int step, int offset);
  68. void bool_item(const char* text, char* address);
  69. int  button(const char* s);
  70. void button_line(int n, const char** b) ;
  71.  
  72. void display(int xpos,int ypos,int win_x,int win_y,int win_width,int win_height);
  73.  
  74. int read();
  75.  
  76. int open(int xpos,int ypos,int win_x,int win_y,int win_width,int win_height,int mode=1);
  77.  
  78. void close();
  79.  
  80.  LEDA_PANEL(const char* label="", int bl=0);
  81.  
  82. ~LEDA_PANEL();
  83.  
  84. static void panel_redraw_func();
  85.  
  86. };
  87.  
  88.  
  89.